import React, { Component } from 'react'
import { GlobalStyle } from './style';
import Header from './common/header';
import { Route, BrowserRouter } from 'react-router-dom'
import { GlobalStyleOne } from './common/static/iconfont/iconfont';
import {Provider} from 'react-redux'
import { store } from './store';
import Home from './pages/home'
import Detail from './pages/detail/loadable';
import Login from './pages/login'

export default class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <GlobalStyle /> 
        <GlobalStyleOne />
        <BrowserRouter>
        <Header />
          <div>
            <Route path="/" exact component={Home}></Route>
            <Route path="/detail/:id" exact component={Detail}></Route>
            <Route path="/login" exact component={Login}></Route>
          </div>
        </BrowserRouter>
      </Provider>
    )
  }
}
